package com.qingneng.budget.service.sdk.impl;

import java.util.List;

import com.qingneng.budget.dao.WorkBudgetDao;
import com.qingneng.budget.service.sdk.IWorkBudgetService;
import com.qingneng.budget.vo.BudgetFeeDoInfo;
import com.qingneng.budget.vo.BudgetItem;
import com.qingneng.budget.vo.BudgetQuantitiesBuildItem;
import com.qingneng.budget.vo.BudgetWorkDoInfo;
import com.qingneng.budget.vo.BudgetWorkQuantities;
import com.qingneng.budget.vo.ProjectWorkInfo;
import com.qingneng.budget.vo.QantitiesBuildItem;

public class WorkBudgetSerivceImpl implements IWorkBudgetService{
	
	public WorkBudgetDao  workBudgetDao ;

	public WorkBudgetDao getWorkBudgetDao() {
		return workBudgetDao;
	}

	public void setWorkBudgetDao(WorkBudgetDao workBudgetDao) {
		this.workBudgetDao = workBudgetDao;
	}

	public void addWorkQuantities(BudgetWorkQuantities record) {
		workBudgetDao.insert(record);
	}

	public List getWorkQuantities(BudgetWorkQuantities record) {
		return workBudgetDao.queryBySelective(record);
		
	}

	public List getBudgetItem(BudgetItem budgetItem) {
		// TODO Auto-generated method stub
		return workBudgetDao.queryWorkItem(budgetItem);
	}

	public void addBudgetWorkDoInfo(BudgetWorkDoInfo bean) {
		workBudgetDao.insertBudgeWorkDoInfo(bean);
		
	}

	public List qetBuildType() {
		// TODO Auto-generated method stub
		return workBudgetDao.queryBuildType();
	}

	public List getFeeItem() {
		// TODO Auto-generated method stub
		return workBudgetDao.queryFeeItem();
	}

	public List getWorkDoInfo(BudgetWorkDoInfo bean) {
		// TODO Auto-generated method stub
		return workBudgetDao.queryWorkDoInfo(bean);
	}

	public void addBudgetFeeDoInfo(BudgetFeeDoInfo bean) {
		// TODO Auto-generated method stub
		workBudgetDao.insertBudgeFeeDoInfo(bean);
	}

	public void destroyBudgetFeeDoInfo(BudgetFeeDoInfo bean) {
		workBudgetDao.deleteBudgeFeeDoInfo(bean);
		
	}

	public void modifyFeeAmount2WorkInfo(ProjectWorkInfo bean) {
		// TODO Auto-generated method stub
		workBudgetDao.updateBudgeFeeAmount(bean);
	}

	public void destroyWorkQuantities(BudgetWorkQuantities bean) {
		workBudgetDao.deleteWorkQuantities(bean);
		BudgetQuantitiesBuildItem buildBean = new BudgetQuantitiesBuildItem();
		//删除工程量中建筑类型项
		buildBean.setProject_workinfo_id(bean.getProject_workinfo_id());
		workBudgetDao.deleteBudgetQuantitiesBuildItem(buildBean);
	}

	public List getBudgetFeeDoInfo(BudgetFeeDoInfo bean) {
		return workBudgetDao.queryBudgeFeeDoInfo(bean);
		
	}

	public List getWorkDoInfoByWorkInfoIdAndItemId(BudgetWorkDoInfo bean) {
		return workBudgetDao.queryWorkDoInfoByWorkInfoIdAndItemId(bean);
	}

	public void destroyBudgetWorkDoInfo(BudgetWorkDoInfo bean) {
		// TODO Auto-generated method stub
		 workBudgetDao.deleteWorkDoInfo(bean);
	}

	public void destroySubBudgetWorkDoInfo(BudgetWorkDoInfo bean) {
		workBudgetDao.deleteSubWorkDoInfo(bean);
		
	}

	public List getBuildItem(QantitiesBuildItem bean) {
		// TODO Auto-generated method stub
		return workBudgetDao.queryQuantitiesBuildItem(bean);
	}

	public List getBudgetQuantitiesBuildItem(BudgetQuantitiesBuildItem bean) {
		// TODO Auto-generated method stub
		return workBudgetDao.queryBudgetQuantitiesBuildItem(bean);
	}

	public void addBudgetQuantitiesBuildItem(BudgetQuantitiesBuildItem bean) {
		workBudgetDao.insertBudgetQuantitiesBuildItem(bean);
		
	}

	public void updateWorkQuantities(BudgetWorkQuantities record) {
		workBudgetDao.updateWorkQuantities(record);
		
	}

}
